<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>更新文章</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$data.id}" />
        <input type="hidden" name="a_type" value="{$a_type}" />
        <div class="form-item">
            <label class="item-label">文章类型</label>
            <div class="controls">
                <select name="tid">
                    <volist name="infotype" id="v">
                        <option value="{$v.id}" <if condition="$data.tid eq $v[id]">selected</if>>{$v.title}</option>
                    </volist>
                </select>
            </div>
        </div>
         <div class="form-item">
            <label class="item-label">标题</label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$data.title}" />
            </div>
        </div>
         <div class="form-item">
            <label class="item-label">内容</label>
            <div class="controls">
                <textarea name="content">{$data.content}</textarea> 
                {:hook('adminArticleEdit', array('name'=>content,'value'=>$data['content']))}
            </div>
        </div>
         <div class="form-item">
            <label class="item-label">图片</label>
            <div class="controls">
                <input type="file" class="text input-large" name="tupian" value="" /><br>
                <if condition="$data.tupian neq '' ">
                    <img src="__ROOT__{$data.tupian}" name="s" style="width: 200px; height: 200px;" value="{$data.tupian}"/>
                </if>
                <input type="hidden" name="tupian2" value="{$data.tupian}" />
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn " id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('infoList')}');
    </script>
</block>